package org.dfg.corejava.jdk5;

import java.lang.reflect.Method;

/**
 * @author DingFugui
 */
public class Test {
	public static void main(String[] args) {
		Method[] methods = Test.class.getMethods();
		for (Method m : methods) {
			if (m.isAnnotationPresent(MyAnnotation.class)) {
				MyAnnotation a = m.getAnnotation(MyAnnotation.class);
				System.out.println(m.getName());
				System.out.println(a.id());
				System.out.println(a.description());
			}
		}
	}

	@MyAnnotation(id = 0, description = "s")
	public void show() {

	}
}
